package com.homelock.common.vo;

import java.io.Serializable;

public class Resp implements Serializable {
    /**
     * 接口统一返回状态
     */
    public static final int REQUEST_STATUS_SUCCESS=200;//成功
    public static final int REQUEST_STATUS_FAILD=400;//业务失败
    public static final int REQUEST_STATUS_ERROR=500;//异常

    private int status;// 状态码
    private String msg;// 状态信息
    private Object data;// 数据对象


    public Resp() {
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public boolean equalOk(){
        return getStatus() == REQUEST_STATUS_SUCCESS;
    }
}
